package ooad.gof.composite;
public class Client {
	public static void main(String[] args) {
		Component root = new Composite("根目录");
		Component file1 = new Leaf("文件1");
		root.add(file1);
		Component dir1 = new Composite("文件夹1");
		Component file2 = new Leaf("文件2");
		dir1.add(file2);
		root.add(dir1);
		root.getAll();	
		dir1.getAll();
	}
}
